package com.xucranger.ojapi.enity.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName codeforces
 */
@TableName(value ="codeforces")
@Data
public class Codeforces implements Serializable {
    /**
     * id
     */
    @TableId
    private Integer fid;

    private String stuname;

    private String stuid;

    /**
     * 比赛名称
     */
    private String cfcontestname;

    /**
     * id
     */
    private String cfid;

    /**
     * 比赛时间
     */
    private String cfcontestdate;

    /**
     * 比赛排名
     */
    private String cfrank;

    /**
     * 最新积分
     */
    private String cfscore;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Codeforces other = (Codeforces) that;
        return (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))

            && (this.getCfcontestname() == null ? other.getCfcontestname() == null : this.getCfcontestname().equals(other.getCfcontestname()))
            && (this.getCfid() == null ? other.getCfid() == null : this.getCfid().equals(other.getCfid()))
            && (this.getCfcontestdate() == null ? other.getCfcontestdate() == null : this.getCfcontestdate().equals(other.getCfcontestdate()))
            && (this.getCfrank() == null ? other.getCfrank() == null : this.getCfrank().equals(other.getCfrank()))
            && (this.getCfscore() == null ? other.getCfscore() == null : this.getCfscore().equals(other.getCfscore()))
            && (this.getStuid() == null ? other.getStuid() == null : this.getStuid().equals(other.getStuid()))
            && (this.getStuname() == null ? other.getStuname() == null : this.getStuname().equals(other.getCfcontestname()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getStuid() == null) ? 0 : getStuid().hashCode());
        result = prime * result + ((getStuname() == null) ? 0 : getStuname().hashCode());
        result = prime * result + ((getCfcontestname() == null) ? 0 : getCfcontestname().hashCode());
        result = prime * result + ((getCfid() == null) ? 0 : getCfid().hashCode());
        result = prime * result + ((getCfcontestdate() == null) ? 0 : getCfcontestdate().hashCode());
        result = prime * result + ((getCfrank() == null) ? 0 : getCfrank().hashCode());
        result = prime * result + ((getCfscore() == null) ? 0 : getCfscore().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fid=").append(fid);
        sb.append(", stuid=").append(stuid);
        sb.append(", stuname=").append(stuname);
        sb.append(", cfcontestname=").append(cfcontestname);
        sb.append(", cfid=").append(cfid);
        sb.append(", cfcontestdate=").append(cfcontestdate);
        sb.append(", cfrank=").append(cfrank);
        sb.append(", cfscore=").append(cfscore);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}